﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TreeGraphicalControl;
using FeatureModelCore.Configuration;
using Collections.TreeCollections;
using System.Windows.Controls;
using System.Windows.Media;

namespace FeatureModelTool.ConfigGraphic
{
    public class TreeItem_ConfigRoot : TreeViewItemControl
    {
        public ConfigRoot ConfigInstance { get; protected set; }
        public TreeItem_ConfigRoot(ConfigRoot configRoot)
        {
            ConfigInstance = configRoot;
            this.Header = configRoot.NodeName;
            this.IsExpanded = true;
            this.Background = Brushes.Azure;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="treeObj"></param>
        /// <returns></returns>
        public static TreeItem_ConfigRoot ConstructTreeItem(TreeObject treeObj)
        {
            ConfigRoot root = treeObj as ConfigRoot;
            if (root == null)
            {
                return null;
            }
            return new TreeItem_ConfigRoot(root);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="treeItem"></param>
        /// <param name="treeRoot"></param>
        /// <returns></returns>
        public static ContextMenu GenerateContext(TreeViewItemControl treeItem
            , TreeRoot treeRoot)
        {
            return null;
        }
    }
}
